package com.lcxsoft.adminservice.controller;


import com.lcxsoft.adminservice.url.AdminServiceUrl;
import com.lcxsoft.commonutils.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("管理员登录")
@RestController
@RequestMapping(value = AdminServiceUrl.packageUrl)
public class AdminController {

    @PostMapping(AdminServiceUrl.AdminsUrl.login)
    public R login(){
        return R.ok().data("token", "admin");

    }

    @GetMapping(AdminServiceUrl.AdminsUrl.userInfo)
    public R userInfo(){
        return R.ok().data("roles", "[admin]").data("name", "admin").data("avatar", "https://www.baidu.com");
    }
}
